import request from '@/utils/request'

// 查询角色列表
export function getRoleList(query) {
    return request({
        url: '/system/block/role/list',
        method: 'get',
        params: query
    })
}
// 新增角色信息
export function addRole(data) {
    return request({
        url: '/system/block/role/addRole',
        method: 'post',
        data: data
    })
}
// 编辑部门信息
export function editRole(data) {
    return request({
        url: '/system/block/role/editRole',
        method: 'put',
        data: data
    })
}
// 编辑角色状态
export function editRoleStatus(data) {
    return request({
        url: '/system/block/role/editRoleStatus',
        method: 'put',
        data: data
    })
}

// 删除角色信息
export function deleteRole(roleId) {
    return request({
        url: '/system/block/role/deleteRole/' + roleId,
        method: 'delete'
    })
}
// 查询用户分配的角色id列表
export function getRoleMenuIdList(roleId) {
    return request({
        url: '/system/block/role/getRoleMenuIdList/' + roleId,
        method: 'get'
    })
}

// 角色分配菜单
export function roleSetMenu(data) {
    return request({
        url: '/system/block/role/roleSetMenu',
        method: 'put',
        data: data
    })
}
